package com.tyqx.hashchainbackend.service;




import com.tyqx.hashchainbean.module.SysPermission;
import com.tyqx.hashchainbean.vo.PerOrResourceResultVO;
import com.tyqx.hashchainbean.vo.SysPermissionVO;

import java.util.List;
import java.util.Map;

public interface SysPermissionService {

    public SysPermission getById(Long perId) throws Exception;

    /**
     * 查询所有权限
     *
     * @param parentId 权限父级ID
     * @return
     * @throws Exception
     */
    public List<PerOrResourceResultVO> getListByMap(Integer parentId) throws Exception;

    public Integer getCountByMap(Map<String, Object> param) throws Exception;

    public Integer save(SysPermission sysPermission) throws Exception;

    public Integer modify(SysPermission sysPermission) throws Exception;

    public Integer removeById(Long perId) throws Exception;

    public List<SysPermissionVO> getListByMaps(Integer parentId)throws Exception;

    List<SysPermissionVO> getSysPermissionList(Integer perId);
    int pRemove(Integer perId);
    int pAdd(Integer perParentId, String perName, String createBy);
    int pModify(Integer perId, String perName, String modifyBy);

    /**
     * 根据父级ID查找下面的所有子级ID
     * @param parentId
     * @return
     */
    List<Long> queryPerId(Long parentId);

    Integer getAllPerCou();
    List<SysPermissionVO> getAllPer(Integer page, Integer limit);
}
